<?php
class tournament_class extends Model {
	
	public function __construct($arrInitialValues = null){
		$this->setTable('class');
		$this->setColumnId('class_id');
		parent::__construct($arrInitialValues);
	}
	
	public function getAllOfClass(){
		$query = '
			SELECT *
			FROM tournament
			WHERE class_id = ' . $this->getId();
		
		$dbHelper = new DBHelper($query);
		return $dbHelper->getResult();
	}

}

?>